#ifndef MINET_DEV_H
#define MINET_DEV_H

#include <QObject>
#include <QPoint>
#include <QQueue>
#include <QThread>
#include "src/minet.h"

#define NODE_WIRELESS_DISTANCE (130)

class MiNetDev : public QThread
{
    Q_OBJECT
public:
    MiNetDev(QPoint &pos, uint16_t addr, uint8_t chl);
    ~MiNetDev();

    void run();
    void posUpdate(QPoint &pos);
    QPoint posGet();
    uint16_t addr();

signals:

private:
    minet_if_t *netif;
    QPoint pos;

    void debug(uint8_t *buf, int len, char *info);

public slots:
};

#ifdef __cplusplus
extern "C"
{
#endif  /* __cplusplus */

extern int simlock;
extern void minet_simdev_init(void);

#ifdef __cplusplus
}
#endif  /* __cplusplus */

#endif // MINET_DEV_H
